package com.base.study04_collection;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * ClassName: ArrayListStudy
 * PackageName: com.cwy.study04_collection
 * Describe:
 *
 * @author: Cheng Wenying
 * @Create: 2024/1/25
 * @version:
 */
public class ArrayListStudy {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("aaa");
        list.add("bb");
//        list.remove("aaa");

        // 迭代器
        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()){
            System.out.print(iterator.next() + ".");
        }
    }
}
